package com.lqr.service.impl;

import com.lqr.dao.AccountDao;
import com.lqr.dao.impl.AccountDaoImpl;
import com.lqr.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;

public class AccountServiceImpl implements AccountService {
    @Autowired
    private AccountDao accountDao;

    public void setAccountDao(AccountDaoImpl accountDao) {
        this.accountDao = accountDao;
    }
    @Override
    public void transfer(String fromName, String toName, double money) {
        accountDao.updateSubMoney(fromName,money);
        System.out.println(1/0);
        accountDao.updateAddMoney(toName,money);
    }
}
